<!--

    Copyright © 2016-2024 The Thingsboard Authors

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<div class="tb-form-panel no-border no-padding" [formGroup]="securityConfigFormGroup">
  <div class="tb-form-hint tb-primary-fill">{{ 'gateway.hints.path-in-os' | translate }}</div>
  <div class="tb-form-row space-between tb-flex fill-width">
    <div class="fixed-title-width" tbTruncateWithTooltip tb-hint-tooltip-icon="{{ 'gateway.hints.ca-cert' | translate }}">
      <span tbTruncateWithTooltip translate>gateway.client-cert-path</span>
    </div>
    <div class="tb-flex no-gap">
      <mat-form-field class="tb-flex no-gap" appearance="outline" subscriptSizing="dynamic">
        <input matInput name="value" formControlName="certfile" placeholder="{{ 'gateway.set' | translate }}"/>
      </mat-form-field>
    </div>
  </div>
  <div class="tb-form-row space-between tb-flex fill-width">
    <div class="fixed-title-width" tb-hint-tooltip-icon="{{ 'gateway.private-key-path' | translate }}">
      <span tbTruncateWithTooltip translate>gateway.private-key-path</span>
    </div>
    <div class="tb-flex no-gap">
      <mat-form-field class="tb-flex no-gap" appearance="outline" subscriptSizing="dynamic">
        <input matInput name="value" formControlName="keyfile" placeholder="{{ 'gateway.set' | translate }}"/>
      </mat-form-field>
    </div>
  </div>
  <div class="tb-form-row space-between tb-flex fill-width">
    <div class="fixed-title-width" translate>gateway.password</div>
    <div class="tb-flex no-gap">
      <mat-form-field class="tb-flex no-gap" appearance="outline" subscriptSizing="dynamic">
        <input matInput type="password" name="value" formControlName="password" placeholder="{{ 'gateway.set' | translate }}"/>
        <div class="tb-flex no-gap align-center fill-height" matSuffix>
          <tb-toggle-password class="tb-flex align-center fill-height"></tb-toggle-password>
        </div>
      </mat-form-field>
    </div>
  </div>
  <div *ngIf="!isMaster" class="tb-form-row space-between tb-flex fill-width">
    <div class="fixed-title-width" translate>gateway.server-hostname</div>
    <div class="tb-flex no-gap">
      <mat-form-field class="tb-flex no-gap" appearance="outline" subscriptSizing="dynamic">
        <input matInput name="value" formControlName="server_hostname" placeholder="{{ 'gateway.set' | translate }}"/>
      </mat-form-field>
    </div>
  </div>
  <div *ngIf="isMaster" class="tb-form-row" fxLayoutAlign="space-between center">
    <mat-slide-toggle class="mat-slide" formControlName="reqclicert">
      <mat-label>
        {{ 'gateway.request-client-certificate' | translate }}
      </mat-label>
    </mat-slide-toggle>
  </div>
</div>
